pub fn dp_rec_mc(amount: u32) -> u32 {
    const CASHES: [u32; 8] = [1, 2, 5, 10, 20, 30, 50, 100];

    if amount == 0 {
        return 0; // 如果金额为 0，则需要 0 张纸币
    }

    // 创建一个数组，用于存储每个金额的最小纸币数
    let mut dp = vec![u32::MAX; (amount + 1) as usize];
    dp[0] = 0; // 金额为 0 时，纸币数为 0

    for &cash in &CASHES {
        for i in cash..=amount {
            dp[i as usize] = dp[i as usize].min(dp[(i - cash) as usize] + 1);
        }
    }

    dp[amount as usize]
}
